import { defineStore } from "pinia";
import { ref } from 'vue'
import { getCategoryList } from "@/apis/layout";

export const useCategoryStore = defineStore("category",() => {
    // 分类列表
    const categoryList = ref([])
    // 获取分类列表
    const getCategory = async () => {
    const res = await getCategoryList()
    categoryList.value = res.result
    }
    return { categoryList, getCategory}
})